﻿define([
    'Xjs/core/util',
    'Xjs/ui/Control'
],
function (util, Control) {
    'use strict';

    var type = 'tableHeaderCell',
    TableHeaderCell = Xjs.getType(type);

    if (TableHeaderCell) { // It has been already loaded
        return TableHeaderCell;
    }

    TableHeaderCell = util.define({
        base: Control,
        construct: function (conf, parent) {
            TableHeaderCell.base.constructor.call(this, conf, parent); // Call the base constructor
        },
        tag: 'th',
        type: type,

        getRow: function () {
            return this.parent;
        }
    });

    Xjs.registerType(TableHeaderCell);

    return TableHeaderCell;
});